<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>资料管理员</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//设置重置按钮
			$("#btnReset").click(function(){
				$(':input','#searchForm').not(':button, :submit, :reset, .notReset').val('').removeAttr('checked').removeAttr('selected');
				$(".select2-chosen").text('');
			});
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		function fun_form(id){
			  var iframeUrl = "${ctx}/sys/userMatch/form?id="+id;
				top.$.jBox.open("iframe:"+iframeUrl, "用户组织信息维护", 550,350, {
		            buttons:{}, submit:function(v, h, f){
		                if (v=="ok"){
		                }
		            }, loaded:function(h){
		                //$(".jbox-content", top.document).css("overflow-y","hidden");
		            },closed: function () { 
		            	page(1);
		            }
		        });
		}
	</script>
</head>
<body>
<div class="seachList-top">
	<ul class="nav nav-tabs oneNav">
		<li class="active"><a class="co-red" href="#">用户组织信息维护</a></li>
	</ul>
	
	<form:form id="searchForm" modelAttribute="userMatch" action="${ctx}/sys/userMatch/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
		  <li><label>归属部门：</label><sys:treeselect id="office" name="userDept" value="${userMatch.userDept}" labelName="userDeptName" labelValue="${userMatch.userDeptName}" 
				title="部门" url="/sys/office/treeData?type=2" cssClass="input-small" allowClear="true" notAllowSelectParent="true"/></li>
		  <label>域账户/名称：</label>
	      <input name="userName" type="text" class="input-medium" maxlength="20" value="${userMatch.userName}" />
		</li>
		<li class="clearfix"></li>
		
		<li class="btns">
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-success" onclick="page(1)" style="margin-left: 75px; padding:4px 25px;" type="submit" value="查询"/>
		&nbsp; <input id="btnSubmit" type="button" class="btn btn-warning btnClass" value="新增" onclick="fun_form('')"/>
		&nbsp; <input id="btnReset" type="button" class="btn btn-warning " value="重置"/>
	</li>
		
		</ul>
	</form:form>
	<tags:message content="${message}"/>
	<div class="form-seach-width">
	<table id="contentTable" class="table table-striped table-bordered table-condensed" >
		<thead>
			<tr>
				<th>域账户</th>
				<th>姓名</th>
				<th>部门</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="info">
			<tr>
				<td>${info.userId}</td>
				<td>${info.userName}</td>
				<td>${info.userDeptName}</td>
				<td>
    				<a href="javascript:fun_form('${info.id}')">修改</a>
					<a href="${ctx}/sys/userMatch/delete?id=${info.id}" onclick="return confirmx('确认删除？', this.href)">删除</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	</div>
	<div class="pagination">${page}</div>
	</div>
</body>
</html>
